package com.yulongtian.weekCompetition.month202303.week01;

/**
 * @author yulongTian
 * @create 2023-03-04 22:37
 */
public class Test02 {
    public static void main(String[] args) {
        System.out.println(coloredCells(3));
    }

    public static long coloredCells(int n) {
        //第n个的中间的个数
        long mid = 2 * n - 1;
        return (n-1)*(mid-1)+mid;
    }

}
